package com.lm56.common;

import java.util.HashMap;

@SuppressWarnings("serial")
public class Tree extends HashMap<String,Object> {
	
	private static final String id="id";
	private static final String pId="pId";
	private static final String name="name";
	private static final String custom="custom"; //自定义属性
	private static final String isParent="isParent";
	
	public String getCustom() {
		return get(Tree.custom)!=null?(String)get(Tree.custom):"";
	}
	public void setCustom(String custom) {
		put(Tree.custom, custom);
	}
	
	public String getPId() {
		return get(Tree.pId)!=null?(String)get(Tree.pId):"";
	}
	public void setPId(String pId) {
		put(Tree.pId, pId);
	}
	
	public String getId() {
		return get(Tree.id)!=null?(String)get(Tree.id):"";
	}

	public void setId(String id) {
		put(Tree.id, id);
	}
	
	public void setName(String name) {
		put(Tree.name, name);
	}
	
	public String getName() {
		return get(Tree.name)!=null?(String)get(Tree.name):"";
	}
	
	public boolean getIsParent() {
		Object object=get(isParent);
		return object.toString().equals("true")?true:false;
	}
	public void setIsParent(boolean isParent) {
		put(Tree.isParent, isParent);
	}
}
